﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SendMail.ascx.cs" Inherits="Gollie.Controls.Admin.SendMail" %>

<script type="text/javascript" src="/Scripts/nicEdit-latest.js"></script>
<script type="text/javascript">
    function setHtml() { document.getElementById('litHtml').textContent = (nicEditors.findEditor('tbBody').getContent()); }
    function setBody() { nicEditors.findEditor('tbBody').setContent(document.getElementById('litHtml').textContent); }
    bkLib.onDomLoaded(function () { nicEditors.editors.push(new nicEditor().panelInstance(document.getElementById('tbBody'))); setHtml(); });
</script>

<span style="font-weight: bold;">Send to:</span>
<asp:RadioButtonList ID="rblReceivers" runat="server" RepeatDirection="Vertical" AutoPostBack="false">
    <asp:ListItem Value="c">Consumers only</asp:ListItem>
    <asp:ListItem Value="v">Vendors only</asp:ListItem>
    <asp:ListItem Value="b" Selected="True">Both</asp:ListItem>
</asp:RadioButtonList>
<hr />
<span class="common">Subject:</span><asp:TextBox ID="tbSubject" runat="server" Width="600px"></asp:TextBox>
<hr />
<span class="common">Body:</span>
<br />
<div>
<asp:TextBox ID="tbBody" runat="server" ClientIDMode="Static" TextMode="MultiLine" Width="100%" Columns="60">
    &lt;p&gt;Geachte relatie,&lt;/p&gt;
    &lt;br /&gt;
    &lt;p&gt;
        Met vriendelijke groet,&lt;br /&gt;
        &lt;a href=&quot;http://www.gollie.nl&quot;&gt;gollie.&lt;/a&gt;
    &lt;/p&gt;
</asp:TextBox>
</div>

<br />
<br />
<input type="button" id="btnHtml" value="Show html" onclick="setHtml(); return false;"/>
<br />
<br />
<div>
<asp:TextBox id="litHtml" runat="server" ClientIDMode="Static" TextMode="MultiLine" BackColor="White" BorderColor="Black" BorderWidth="1px" BorderStyle="Solid" Width="80%" Height="200px">flop</asp:TextBox>
<input type="button" id="btnSetContent" value="Set body" onclick="setBody(); return false;"/>
</div>
<br />
<asp:Button ID="btnSend" runat="server" Text="Send"  OnClientClick="setHtml(); return confirm('About to send mails. Continue?');" />